package com.dzz.sjgl.entity;

import org.hibernate.annotations.Proxy;

import javax.persistence.*;
import java.util.*;

/**
 * @author KRIC
 * @ClassName PaperInfo
 * @Date: 2019/3/13 11:38
 * @Description:
 */
@Entity
@Proxy(lazy = false)
@Table(name = "paper_info", schema = "sjgl")
public class PaperInfo {
    private int id;
    private String name;
    private String subjects;
    private Integer userId;
    private Date createTime;
    private String imgPath;
    private String wordPath;
    private String pdfPath;
    private String status;
    private String province;
    private String exam;
    private Integer year;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "name", nullable = true, length = 255)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "subjects", nullable = true, length = 40)
    public String getSubjects() {
        return subjects;
    }

    public void setSubjects(String subjects) {
        this.subjects = subjects;
    }

    @Basic
    @Column(name = "user_id", nullable = true)
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "create_time", nullable = true)
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        PaperInfo paperInfo = (PaperInfo) o;
        return id == paperInfo.id &&
                Objects.equals(name, paperInfo.name) &&
                Objects.equals(subjects, paperInfo.subjects) &&
                Objects.equals(userId, paperInfo.userId) &&
                Objects.equals(createTime, paperInfo.createTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, subjects, userId, createTime);
    }

    @Basic
    @Column(name = "img_path", nullable = true, length = 255)
    public String getImgPath() {
        return imgPath;
    }

    public void setImgPath(String imgPath) {
        this.imgPath = imgPath;
    }

    @Basic
    @Column(name = "word_path", nullable = true, length = 255)
    public String getWordPath() {
        return wordPath;
    }

    public void setWordPath(String wordPath) {
        this.wordPath = wordPath;
    }

    @Basic
    @Column(name = "pdf_path", nullable = true, length = 255)
    public String getPdfPath() {
        return pdfPath;
    }

    public void setPdfPath(String pdfPath) {
        this.pdfPath = pdfPath;
    }

    @Basic
    @Column(name = "status", nullable = false, length = 2)
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "province", nullable = true, length = 255)
    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    @Basic
    @Column(name = "exam", nullable = true, length = 255)
    public String getExam() {
        return exam;
    }

    public void setExam(String exam) {
        this.exam = exam;
    }

    @Basic
    @Column(name = "year", nullable = true)
    public Integer getYear() {
        return year;
    }

    public void setYear(Integer year) {
        this.year = year;
    }
}
